package com.hanhai.material.device.entity;

import com.mybatisflex.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;

/**
 *  实体类。
 *
 * @author youchuang
 * @since 2024/04/28 17:36:30
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("")
@Table(value = "sys_reason_type1",dataSource = "device")
public class SysReasonType1 implements Serializable {

    @Id(keyType = KeyType.Auto)
    @ApiModelProperty("")
    private Integer id;

    @ApiModelProperty("")
    private String reasonTypeName;

    @ApiModelProperty("")
    private Timestamp createTime;

    @ApiModelProperty("")
    private Timestamp updateTime;

    @ApiModelProperty("")
    private String createUserId;

    @ApiModelProperty("")
    private String updateUserId;

    @ApiModelProperty("")
    private Integer order;

    @ApiModelProperty("")
    private String workShop;

    @ApiModelProperty("")

    private Integer pid;

    @ApiModelProperty("")
    private String reasonName;
    @RelationOneToOne(selfField = "pid",targetField = "id",dataSource = "device")
    private SysReasonType1 reasonType1;
    @RelationOneToMany(selfField = "id",targetField = "pid",dataSource = "device")
    List<SysReasonType1> reasonType1List;
    @Column(ignore = true)
    private int num;
//    @RelationOneToMany(selfField = "id",targetField = "reasonId",extraCondition = "product_record_id = :productRecordId")
//    private List<SysBadRecord1> badRecord1List;

}
